using System.Collections.Generic;
using UnityEngine;

namespace UFrame
{
    /// <summary>
    /// 选择技能进行信息编辑
    /// 1. 人物模型 -> 技能选择
    /// 2. 从技能表中选择
    /// </summary>
    public class PLSkillInfoWindow : SkillSecondWindow
    {
        public string path;

        private PLSkillInfoWindowLayout p = new PLSkillInfoWindowLayout();

        public PLSkillInfoWindow(EffectEditor t, float x, float y, float width, float height) : base(t, x, y, width,
            height)
        {
            name = "技能编辑器信息";
        }

        protected override void Draw(int id)
        {
            //自动布局界面
            DisplayClassSet set = new DisplayClassSet();
            PLEditorTool.ShowClassBox(p, set);

            if (set.IsModify("mode"))
            {
                Debug.Log(p.mode);
            }

            if (set.IsModify("creaturePrefab"))
            {
                Debug.Log(p.creaturePrefab);
            }

        }
    }

    /// <summary>
    /// 负责布局的信息
    /// </summary>
    public class PLSkillInfoWindowLayout
    {
        public static List<string> creatureList = new List<string>();
        [PLFieldSelect("1", "2", "3")] public string creaturePrefab;
        public EPLSkillMode mode;

        public void OnMode(EPLSkillMode mode)
        {
            Debug.Log("盘子脸" + mode);
        }
    }

    /// <summary>
    /// 编辑技能的模式
    /// </summary>
    public enum EPLSkillMode
    {
        Creature,
        Skill,
    }
}